/**
 * Copyright &copy; 2012-2016 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
 */
package com.ctop.modules.job.entity;

import javax.validation.constraints.NotNull;
import org.hibernate.validator.constraints.Length;

import com.ctop.common.persistence.DataEntity;

/**
 * 定时任务日志Entity
 * @author linbc
 * @version 2017-12-19
 */
public class ScheduleJobLog extends DataEntity<ScheduleJobLog> {
	
	private static final long serialVersionUID = 1L;
	private ScheduleJob job;		// 任务
	private String beanName;		// bean名称
	private String methodName;		// 方法名
	private String params;		// 参数
	private String jobResult;		// 执行结果
	private String error;		// 失败信息
	private String times;		// 耗时(单位：毫秒)
	
	public ScheduleJobLog() {
		super();
	}

	public ScheduleJobLog(String id){
		super(id);
	}

	@NotNull(message="任务不能为空")
	public ScheduleJob getJob() {
		return job;
	}

	public void setJob(ScheduleJob job) {
		this.job = job;
	}
	
	@Length(min=0, max=200, message="bean名称长度必须介于 0 和 200 之间")
	public String getBeanName() {
		return beanName;
	}

	public void setBeanName(String beanName) {
		this.beanName = beanName;
	}
	
	@Length(min=0, max=100, message="方法名长度必须介于 0 和 100 之间")
	public String getMethodName() {
		return methodName;
	}

	public void setMethodName(String methodName) {
		this.methodName = methodName;
	}
	
	@Length(min=0, max=2000, message="参数长度必须介于 0 和 2000 之间")
	public String getParams() {
		return params;
	}

	public void setParams(String params) {
		this.params = params;
	}
	
	@Length(min=1, max=1, message="执行结果长度必须介于 1 和 1 之间")
	public String getJobResult() {
		return jobResult;
	}

	public void setJobResult(String jobResult) {
		this.jobResult = jobResult;
	}
	
	@Length(min=0, max=2000, message="失败信息长度必须介于 0 和 2000 之间")
	public String getError() {
		return error;
	}

	public void setError(String error) {
		this.error = error;
	}
	
	@Length(min=1, max=11, message="耗时(单位：毫秒)长度必须介于 1 和 11 之间")
	public String getTimes() {
		return times;
	}

	public void setTimes(String times) {
		this.times = times;
	}
	
}